package tf_rna_hit;

public class Time {
 public void run_time(long start, long end){
	 long time = (end - start)/1000;
	 
	 if(time <= 60){
		 System.out.println("一共耗时：" + time + "s");
	 }else if( time > 60 & time <= 3600){
		 System.out.println("一共耗时：" + time/60 + "min\t" + time%60 + "s");
	 }else if( time > 3600){
		 System.out.println("一共耗时：" + time/3600 + "h\t" + (time%3600)/60 + "min\t" + (time%3600)%60 + "s");
	 }else if( time > 86400){
		 System.out.println("一共耗时：" + time/86400 + "d\t" + (time%86400)/3600 + "h\t" + ((time%86400)%3600)/60 + "min\t" + ((time%86400)%3600)%60 + "s");
	 }
 }
 
 public void run_time(long start, long end, String message){
	 long time = (end - start)/1000;
	 
	 if(time <= 60){
		 System.out.println(message + "一共耗时：" + time + "s");
	 }else if( time > 60 & time <= 3600){
		 System.out.println(message + "一共耗时：" + time/60 + "min\t" + time%60 + "s");
	 }else if( time > 3600){
		 System.out.println(message + "一共耗时：" + time/3600 + "h\t" + (time%3600)/60 + "min\t" + (time%3600)%60 + "s");
	 }else if( time > 86400){
		 System.out.println(message + "一共耗时：" + time/86400 + "d\t" + (time%86400)/3600 + "h\t" + ((time%86400)%3600)/60 + "min\t" + ((time%86400)%3600)%60 + "s");
	 }
 }
}
